package com.xunfang.service.impl;

import com.xunfang.bean.Order;
import com.xunfang.mapper.OrderMapper;
import com.xunfang.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yellow Docter
 * @date 2023 -11-20
 * @desc
 */
@Service
public class OrderServiceImpl implements IOrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Order> findOrders() {
        return orderMapper.findOrders();
    }

    @Override
    public boolean addOrders(Order order) {
        return orderMapper.addOrders(order) > 0;
    }

    @Override
    public boolean deleteOrderById(int id) {
        return orderMapper.deleteOrderById(id) > 0;
    }
}
